<!doctype html>

<script src="../../resources/js-test.js"></script>

<iframe>
    <!doctype html>
    <frameset rows="*" cols="150,*" frameborder="0" border="10">
        <frame src="data:text/html,<body bgcolor=green>">
        <frame src="data:text/html,<body bgcolor=yellow>">
    </frameset>
</iframe>

<script>
    // Can't use srcdoc since that wouldn't synchronously load the content.
    frame = document.querySelector('iframe');
    frameDoc = frame.contentDocument;
    frameDoc.write(frame.textContent);
    frameDoc.close();

    description('Bug 17767: Frameset with frameborder=0 and border=N should not show a border');
    frames = frameDoc.querySelectorAll('frame');
    shouldBe('frames[0].offsetWidth', '150');
    shouldBe('frames[1].offsetWidth', '150');
</script>

